JQuery: Novice to Ninja by Earle Castledine; Craig Sharkie
Author:Earle Castledine; Craig Sharkie
Language: eng
Format: mobi
Tags: Web, JavaScript, Programming Languages, Computers, Programming, General, Site Design, Ajax (Web site development technology), Design, Web sites, JavaScript (Computer program language), Web Programming
ISBN: 9780980576856
Publisher: SitePoint
Published: 2010-02-28T01:26:54.565265+00:00
Where did that URL come from? We found it by reading the documentation on the site’s API help page. Every site will have different conventions and data formats, so it’s important to spend some time with the API docs!
A Client-side Twitter Searcher
But why are we wasting time on Delicious? We have a Twitter stream to incorporate, and we need to do it quick smart. Following the API link from the Twitter home page will lead us to the information we need to get this show on the road. We’ll use the search URL to return the JSON data for recent public tweets about celebrities:
chapter_06/06_twitter_search/script.js (excerpt)
var searchTerm = "celebs";
var baseUrl = "http://search.twitter.com/search.json?q=";
$.getJSON(baseUrl + searchTerm + "&callback=?", function(data) {
$.each(data.results, function() {
$('<div></div>')
.hide()
.append('<img src="' + this.profile_image_url + '" />')
.append('<span><a href="http://www.twitter.com/'
+ this.from_user + '">' + this.from_user
+ '</a> ' + this.text + '</span>')
.appendTo('#tweets')
.fadeIn();
});
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7791)
Grails in Action by Glen Smith Peter Ledbrook(7705)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6424)
Kotlin in Action by Dmitry Jemerov(5074)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3855)
Mastering Azure Security by Mustafa Toroman and Tom Janetscheck(3337)
Learning React: Functional Web Development with React and Redux by Banks Alex & Porcello Eve(3092)
Mastering Bitcoin: Programming the Open Blockchain by Andreas M. Antonopoulos(2873)
The Art Of Deception by Kevin Mitnick(2613)
Drugs Unlimited by Mike Power(2475)
The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution by Walter Isaacson(2361)
Kali Linux - An Ethical Hacker's Cookbook: End-to-end penetration testing solutions by Sharma Himanshu(2317)
Writing for the Web: Creating Compelling Web Content Using Words, Pictures and Sound (Eva Spring's Library) by Lynda Felder(2267)
A Blueprint for Production-Ready Web Applications: Leverage industry best practices to create complete web apps with Python, TypeScript, and AWS by Dr. Philip Jones(2267)
SEO 2018: Learn search engine optimization with smart internet marketing strategies by Adam Clarke(2197)
JavaScript by Example by S Dani Akash(2141)
DarkMarket by Misha Glenny(2086)
Wireless Hacking 101 by Karina Astudillo(2082)
Hands-On Cybersecurity with Blockchain by Rajneesh Gupta(2003)
